From: Brad Jorsch Date: Thu, 26 Oct 2017 16:22:01 +0000 (-0400) Subject: Remove Article static methods deprecated in 1.24 X-Git-Tag: 1.31.0-rc.0~1669 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=7d93d1d1cda438d05f5a05ae17da36fe41ac27bb;p=lhc%2Fweb%2Fwiklou.git Remove Article static methods deprecated in 1.24 The Article::selectFields(), Article::onArticleCreate(), Article::onArticleDelete(), and Article::onArticleEdit() methods have been deprecated in favor of the correponding WikiPage methods since 1.24. Remove them. Change-Id: I30f3d88f8d28ccaebf5a858058e183112d29a1a7 --- diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31 index 042af6e094..60dd49558a 100644 --- a/RELEASE-NOTES-1.31 +++ b/RELEASE-NOTES-1.31 @@ -57,6 +57,9 @@ changes to languages because of Phabricator reports. * mw.page (deprecated in 1.30) was removed. * Article::getLastPurgeTimestamp(), WikiPage::getLastPurgeTimestamp(), and the related WikiPage::PURGE_* constants, deprecated in 1.29, were removed. +* The Article::selectFields(), Article::onArticleCreate(), + Article::onArticleDelete(), and Article::onArticleEdit() methods, deprecated + in 1.24, were removed. == Compatibility == MediaWiki 1.31 requires PHP 5.5.9 or later. There is experimental support for diff --git a/includes/page/Article.php b/includes/page/Article.php index da8fe886ab..3767ecc141 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -2638,45 +2638,5 @@ class Article implements Page { return $handler->getAutoDeleteReason( $title, $hasHistory ); } - /** - * @return array - * - * @deprecated since 1.24, use WikiPage::selectFields() instead - */ - public static function selectFields() { - wfDeprecated( __METHOD__, '1.24' ); - return WikiPage::selectFields(); - } - - /** - * @param Title $title - * - * @deprecated since 1.24, use WikiPage::onArticleCreate() instead - */ - public static function onArticleCreate( $title ) { - wfDeprecated( __METHOD__, '1.24' ); - WikiPage::onArticleCreate( $title ); - } - - /** - * @param Title $title - * - * @deprecated since 1.24, use WikiPage::onArticleDelete() instead - */ - public static function onArticleDelete( $title ) { - wfDeprecated( __METHOD__, '1.24' ); - WikiPage::onArticleDelete( $title ); - } - - /** - * @param Title $title - * - * @deprecated since 1.24, use WikiPage::onArticleEdit() instead - */ - public static function onArticleEdit( $title ) { - wfDeprecated( __METHOD__, '1.24' ); - WikiPage::onArticleEdit( $title ); - } - // ****** } diff --git a/tests/phpunit/includes/page/ArticleTest.php b/tests/phpunit/includes/page/ArticleTest.php index 7d0813d141..df4a281701 100644 --- a/tests/phpunit/includes/page/ArticleTest.php +++ b/tests/phpunit/includes/page/ArticleTest.php @@ -54,26 +54,4 @@ class ArticleTest extends MediaWikiTestCase { $this->assertEquals( -8, $this->article->ext_someNewProperty, "Article get/set magic on update to new field" ); } - - /** - * Checks for the existence of the backwards compatibility static functions - * (forwarders to WikiPage class) - * - * @covers Article::selectFields - * @covers Article::onArticleCreate - * @covers Article::onArticleDelete - * @covers Article::onArticleEdit - */ - public function testStaticFunctions() { - $this->hideDeprecated( 'Article::selectFields' ); - - $this->assertEquals( WikiPage::selectFields(), Article::selectFields(), - "Article static functions" ); - $this->assertEquals( true, is_callable( "Article::onArticleCreate" ), - "Article static functions" ); - $this->assertEquals( true, is_callable( "Article::onArticleDelete" ), - "Article static functions" ); - $this->assertEquals( true, is_callable( "ImagePage::onArticleEdit" ), - "Article static functions" ); - } }